<style type="text/css">
<!--

.td-border-top {
	border-top: 1px solid #dedede;
}

.td-border-bottom {
	border-bottom: 1px solid #dedede;
}
td.dt-ct-header{
	width: 150px; 
	background: #dedede
}
td.dt-ct-header-final{
	background: #dedede
}
.info-detail {
	border: 1px solid #dedede;
	padding: 10px;
	background: #fff;
	line-height: 2.5em;
}

.dt-label {
	display: inline-block;
	width: 160px;
	vertical-align: top;
}

.dt-lb-content {
	padding: 1px;
	border-bottom: 1px dotted #666;
	display: inline-block;
	width: 300px;
}
.dt-lb-content + .dt-label{
	margin-left:115px;
}
div.dt-lb-content {
	padding: 15px;
	border: 1px dotted #666;
	line-height: normal;
	display: block;
	width: 900px;
}

div.dt-control {
	text-align: right;
	padding: 10px 10px;
}

div.dt-control a {
	color: #00f;
}
#page-content-right #inner .box-filter input.chkMajor{
	margin-top: 3px;
	margin-bottom: 2px;
	width: auto;
	margin-left: 20px;
}
label.chkNAV{
	display: inline-block;
	vertical-align: top;
	padding-top: 2px;
	padding-left: 5px;
}

table.tbl-tbl{
	border-collapse: collapse; 
	border-color: #ccc;
	width:930px; 
	border:1px solid #ccc;
}
.box-content .box-content-main{
	padding:10px 0px;
}
.box-content .box-content-main table.table-list{
	border: 1px solid #ccc;
	width:100%;
	background: #fff;
}
.box-content-main table.table-list  tr td{
	padding:5px;
}
.box-content-main table.table-list  tr td div.note{
	padding:5px;
	font-size: 11px;
	font-style: italic;
	color:#00f;
	width: 100%;
	text-align: center;
}
.box-content-main table.table-list  tr.class0{
	background: #efefef;
	border-top:1px solid #ccc;
}

.box-content-main table.table-list  tr:hover, 
.box-content-main table.table-list  tr.class0:hover{
	background: #cfc;
	
}
.box-content-main table.table-list  tr.enable-0,
.box-content-main table.table-list  tr.enable-0 *{
	font-style: italic;
	color: #999;
}

.box-content-main table.table-list  tr td + td{
	border-left: 1px solid #ccc;
}
.box-content-main table.table-list .head{
	background: #dadada;
	color:#333;
	font-weight: bold;
	font-size: 13px;
	padding:5px;
	border-bottom:1px solid #ccc;
}


/*FORM*/
.box-content-main table.table-form td.input .button{
	padding:5px 10px;
	height:24px;
	background: url(/css/admin/img/global/button-bg.png) left center repeat-x;
	color:#fff;
	border:none;
	border-radius:5px;
	padding:4px 25px;
	cursor: pointer;
	width: auto;
}
.box-content-main .note, 
.box-content-main .message, 
.box-content-main .required{
	color:#f00;
	font-size: 11px;
	text-align: right;
}
.box-content-main .note{
	float: right;
}
.box-content-main .message{
	float: left;
}
.box-content-main table.table-form{
	background: #fff;
	padding:10px;
	
}
.box-content-main table.table-form tr{
	border-top:1px solid #efefef;
	border:none;
}
 .box-content-main table.table-form td.label{
	width:250px;
	border-top:1px solid #ccc;
	text-align: right;
	border:none;
	background:#fff;
}
.box-content-main table.table-form td.input{
	border-top:1px solid #ccc;
	border:none;
	background:#fff;
}
.box-content-main table.table-form td.input span.error{
	padding:3px;
	width:230px;
	display: inline-block;
	font-size: 11px;
	color:#f00;
}
 .box-content-main table.table-form td.error{
	width:250px;
	border-top:1px solid #ccc;
	text-align: left;
	border:none;
	background:#fff;
}
.box-content-main table.table-form td.error span{
	border:1px solid #f00;
	padding:10px;
	width:230px;
	display: block;
	font-size: 11px;
}
.box-content-main table.table-form td.input input,
.box-content-main table.table-form td.input select,
.box-content-main table.table-form td.input textarea{
	border:1px solid #ccc;
	border-radius: 3px;
	-o-border-radius: 3px;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	padding: 5px 10px;
	text-align: left;
}

.box-content-main table.table-form td.input select{
	padding: 3px;
	font-size: 12px;
	min-width:200px;
}
.box-content-main table.table-form td.input .form-text{
	width: 280px;	
	font-size: 12px;
}
.box-content-main table.table-form td.input .number{
	width: 80px;	
	font-size: 12px;
}
.box-content-main table.table-form td.input .required{
	background: #ffc;
	color: #333;
}
.box-content-main table.table-form td.input .button{
	padding:5px 10px;
	height:24px;
	background: url(/css/admin/img/global/button-bg.png) left center repeat-x;
	color:#fff;
	border:none;
	border-radius:5px;
	padding:4px 25px;
	cursor: pointer;
	width: auto;
}
.box-content-main table.table-form td.input select.date{
	padding: 3px;
	font-size: 12px;
	min-width:70px;
	width:70px;
}
.box-content-main table.table-form td.input > ul,  .box-content-main table.table-form td.input > ul > li{
	list-style: none;
	margin:0px;
	padding:0px;
	display: inline;
}
.box-content-main table.table-form td.input textarea{
	width:500px;
	height:100px;
}
.dt-label {
	display: inline-block;
	width: 310px;
	vertical-align: top;
}

.dt-lb-content {
	padding: 1px;
	border-bottom: 1px dotted #666;
	display: inline-block;
	width: 300px;
}
.dt-lb-content + .dt-label{
	margin-left:115px;
}
div.dt-lb-content {
	padding: 15px;
	border: 1px dotted #666;
	line-height: normal;
	display: block;
	width: 900px;
}

div.dt-control {
	text-align: right;
	padding: 10px 10px;
}

div.dt-control a {
	color: #00f;
}
#page-content-right #inner .box-filter input.chkMajor{
	margin-top: 3px;
	margin-bottom: 2px;
	width: auto;
	margin-left: 20px;
}
label.chkNAV{
	display: inline-block;
	vertical-align: top;
	padding-top: 2px;
	padding-left: 5px;
}
img.pr-face{
	width: 200px;
	display: inline-block;
	border: 1px solid #ccc;
	float: left;
	margin-right: 30px;
}
-->
</style>
<div class="info-detail">
	<?php
		$val = $data['candidate'];
		$photos = CandidatePhotosTable::getListByCandidateId($val['id']);
		$company = CompaniesTable::getDataById($data['job']['company_id']);
		$majors = MasterMajorsTable::getDataListByJobId($data['job']['id']);
		$locations = LocationCitiesTable::getDataListByJobId($data['job']['id']); 
	?>
	<table class="tbl-tbl" cellspacing="0" cellpadding="2" border="1">
				<tr>
					<td class="dt-ct-header"><?php echo __('head_company',null,'candidate_candidates')?></td>
					<td class="dt-ct-header"><?php echo __('head_title',null,'candidate_candidates')?></td>
					<td class="dt-ct-header"><?php echo __('head_major',null,'candidate_candidates')?></td>
					<td class="dt-ct-header"><?php echo __('head_salary',null,'candidate_candidates')?></td>
					<td class="dt-ct-header"><?php echo __('head_work_area',null,'candidate_candidates')?></td>
				</tr>
				<tr>
					<td><?php echo $company['company_name']?></td>
					<td><?php echo  $data['job']['title']?></td>
					<td>
					<?php 
					$str = '';
					foreach($majors as $m):
						echo $str, $m['name'];
						$str = ', ';
					endforeach;?>
					</td>
					<td>
					<?php echo intval($data['job']['salary_payed'])>0?(sfConfig::get('app_currency_symbol').$data['job']['salary_payed']):((intval($data['job']['salary_from'])<=0 && intval($data['job']['salary_to'])<=0)?__('label_salary_discuss',null,'company_jobs'):(sfConfig::get('app_currency_symbol').$data['job']['salary_from'].' - '.sfConfig::get('app_currency_symbol').$data['job']['salary_to']))?>
					</td>
					<td>
					<?php 
					$str = '';
					foreach($locations as $m):
						echo $str, $m['name'];
						$str = ', ';
					endforeach;?>
					</td>
				</tr>
	</table><br/>
	
	<img src="<?php echo empty($photos[0]['photo_url'])?sfConfig::get('app_no-image'):$photos[0]['photo_url']?>" class="pr-face"/>
	<div style="float: left; width: 700px;">
		<label class="dt-label"><?php echo __('label_resource_id',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content">
		<?php
				$com = CandidateResourcesTable::getDataById ( $val ['resource_id'] );
				echo empty ( $com ['name'] ) ? 'N/A' : $com ['name']?>
		</span>
		
		<br/>
		<label class="dt-label"><?php echo __('head_name',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo $data['candidate']['full_name']?></span>
		
		<br/>
		<label class="dt-label"><?php echo __('label_identity_card',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo empty($val['identity_card'])?'&nbsp;':$val['identity_card'] ?></span>	
		
		
		<br /> 
		<label class="dt-label"><?php echo __('gender',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo __('gender_'.str_replace('-','_', $val['gender']), null, 'array_data') ?></span>
		
		<br/>
		<label class="dt-label"><?php echo __('label_date_of_birth',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo DateHelper::dateFormatFree($val['date_of_birth'], 'Y-m-d') ?></span>	
		
		<br/>
		<label class="dt-label"><?php echo __('is_married',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo __('married_'.str_replace('-','_', $val['is_married']), null, 'array_data') ?></span>
		<?php if(!empty($val['job_hope'])):?>
		<br/>
		<label class="dt-label"><?php echo __('job_hope',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo $val['job_hope']; ?></span>
		<?php endif?>
		<br/>
		<label class="dt-label"><?php echo __('working_experience_foreign',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo intval($val['working_experience_foreign'])?$val['working_experience_foreign']:__('experience_0', null, 'candidate_candidates'); ?></span>
		
		<br/>
		<label class="dt-label"><?php echo __('is_japan_training',  null, 'array_data')?></label>
		<span class="dt-lb-content"><?php echo __('is_japan_training_'.intval($val['is_japan_training']), null, 'array_data'); ?></span>
		
		<br/>
		<label class="dt-label"><?php echo __('label_education_text',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo empty($val['education'])?'&nbsp;':$val['education'] ?></span>	
		
		<br/>
		<label class="dt-label"><?php echo __('label_working_status',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo __('working_status_'.str_replace('-','_', $val['working_status']), null, 'array_data') ?></span>
		
		<br/>
		<label class="dt-label"><?php echo __('head_salary',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo intval($val['salary_require'])>0?('<span class="money-show">'.$data['salaries'][$val['salary_id']]['from'].'</span> - <span class="money-show">'.$data['salaries'][$val['salary_id']]['to'].'</span>'):__('label_salary_discuss',null,'candidate_candidates')?></span>
		
		
		<br/>
		<label class="dt-label"><?php echo __('head_work_area',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content">
			<?php
								$areas = LocationCitiesTable::getDataListByCandidateId($val ['id'] );
								$str = '';
								foreach ( $areas as $m ) :
									echo $str, $m ['name'];
									$str = ', ';
								endforeach;
							?>
		</span>
		
		<br/>
		<label class="dt-label"><?php echo __('phone_number',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo $val['phone_number'], empty($val['otherphone'])?'':(' - '.$val['otherphone']) ?> </span>
		
		
		
		<br /> 
		<label class="dt-label"><?php echo __('label_address',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php 
		$city = LocationCitiesTable::getDataById($val['location_city_id']);
		$dist = LocationDistrictsTable::getDataById($val['location_district_id']);
		echo $val['address'], empty ($dist['name'])? '': (', '. $dist['name']), empty($city['name'])?'':(', '.$city['name']) ?></span>
		
	
		
		<br /> 
		<label class="dt-label"><?php echo __('label_home_address',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php
		$city = LocationCitiesTable::getDataById($val['home_city_id']);
		$dist = LocationDistrictsTable::getDataById($val['home_district_id']);
		
		echo $val['home_address'], empty ($dist['name'])? '': (', '. $dist['name']), empty($city['name'])?'':(', '.$city['name']) ?></span>
		
		<br /> 
		<label class="dt-label"><?php echo __('label_contact_address',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo $val['contact_address']?></span>
		
		
		<br/>
		<label class="dt-label"><?php echo __('label_email',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php echo empty($val['email'])?'&nbsp;':$val['email'] ?></span>
		
		<br/>
		<label class="dt-label"><?php echo __('label_documents',  null, 'candidate_candidates')?></label>
		<span class="dt-lb-content"><?php 
			$document = CandidateDocumentsTable::getListByCandidateId($val['id']);
			foreach($document as $doc):
			?>
			<a target="_blank" href="<?php echo $doc['document_url']?>" title="download"><?php echo $doc['file_name']?> &nbsp; <img src="/css/admin/img/global/download.png" width="16px"/></a> <br/>
			<?php 
			endforeach;
		?></span>
		
		<div class="clr"></div>
	</div>
	<div class="clr"></div>
	<br /> 	
	<div class="box-content">
		<?php echo $form['_csrf_token']?>
			<div class="clr"></div>
			<div class="box-content-main ">
				<div class="message"><?php echo empty($data['result'])?'':$data['result']?></div><div class="note"><?php echo __('is_require',null, 'table_list')?></div>
				<div class="clr"></div>
				<table class="table-list table-form" cellspacing="0" cellpadding="0" border="0">
					<tr class="class1">
						<td class="label"><?php echo __('label_date_apply',null,'candidate_candidates')?> <span class="required">*</span></td>
						<td class="input">
							<input type="text" id="date_apply" class="required" name="date_apply" class="form-text " style="width: 120px" readonly="readonly" value="<?php echo $data['date_apply']?>"/>
						</td>
					</tr>
					<tr class="class1">
						<td class="label"><?php echo __('label_interview',null,'candidate_candidates')?> <span class="required">*</span></td>
						<td class="input">
							<?php echo $form['date_interview']->render(array('data-require'=> 'not-empty', 'class'=>'form-text required  date-picker-interview', 'style'=>'width: 120px'))?>
							<span class="error" id="type_error"><?php echo __('not_empty', null, 'table_list')?></span>
						</td>
						
					</tr>
					
					<tr class="class1">
						<td class="label"><?php echo __('label_note_description',null,'candidate_candidates')?></td>
						<td class="input"><?php echo $form['note_description']->render()?></td>
						
					</tr>
					
					<tr class="class1">
						<td class="label"><?php echo __('label_result_status',null,'candidate_candidates')?></td>
						<td class="input"><?php echo $form['result_status']->render(array('class'=>'required result'))?></td>
						
					</tr>
					<tr class="class1">
						<td class="label"><?php echo __('label_comment_from_employer',null,'candidate_candidates')?></td>
						<td class="input"><?php echo $form['comment_from_employer']->render()?></td>
						
					</tr>
					<tr class="class1" style="background:#fff">
						<td class="label">&nbsp;</td>
						<td class="input">
						<?php echo $form['candidate_id']->render(array('readonly'=>'true'))?>
						<?php echo $form['probation_time']->render(array('readonly'=>'true'))?>
						<?php echo $form['job_id']->render(array('readonly'=>'true'))?>
						<input type="button" id="button-submit" data-error="<?php echo __('submit_error', null, 'table_list')?>"  data-action="<?php echo $data['action']?>" name="button_submit" class="button" value="<?php echo $data['button_action']?>"/></td>
						
					</tr>
				</table>
			</div>
			<div class="clr"></div>
			
		</div>
</div>
					